package com.baidu.hateoas.demo.stocks.repository;

import com.baidu.hateoas.demo.stocks.entity.StocksEntity;
import com.baidu.hateoas.demo.stocks.entity.TradeEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
import org.springframework.stereotype.Component;

@Component
@RepositoryRestResource(path = "/trade")
public interface TradeRepository extends JpaRepository<TradeEntity,Long> {

    /**
     * 根据名称查股票信息
     * @param name
     * @return
     */
    public TradeEntity findByName(@Param("name") String name);

}
